<?php
declare (strict_types = 1);

namespace app\api\model\v1;

use think\Model;

/**
 * @mixin \think\Model
 */
class TemplateSecondLevel extends AppModel
{
    //
    public function templateDetail(){
        return $this->hasMany(TemplateDetail::class,'template_second_level_id')->field('id,template_detail_title,year,template_id,template_type_id,desc,deduct_marks_standard,deduct_marks_standard,once_deduct_marks,most_deduct_marks,template_second_level_id');
    }

    public function templateType(){
        return $this->belongsTo(TemplateType::class,'template_type_id');
    }
}
